DateTimeEditors for WinRT
Step 2 of 3: Customizing the Control

In the previous step, you created a WinRT-style application with a C1DateTimePicker control. In this step, you will modify the appearance of the control.

Complete the following steps:

  1. Add Height="60" to the <DateTimeEditors:C1DateTimePicker/> tag to determine height of the control. The XAML markup appears as follows:
C#
Copy Code
<DateTimeEditors:C1DateTimePicker Height="60"/>
  1. Add Width="450" to the <DateTimeEditors:C1DateTimePicker/> tag to determine the width of the control. The XAML markup appears as follows:
Markup
Copy Code
<DateTimeEditors:C1DateTimePicker Height="60" Width="450"/>
  1. Add TimeFormat="ShortTime" to the <DateTimeEditors:C1DateTimePicker/> tag to change the format of the time to a short format consisting of only hours and minute spaces. The XAML markup appears as follows:
Markup
Copy Code
<DateTimeEditors:C1DateTimePicker Height="60" Width="450" TimeFormat="ShortTime"/>
  1. Add DateFormat="Long" to the <DateTimeEditors:C1DateTimePicker/> tag to change the format of the date to a longer format that includes the weekday. The XAML markup appears as follows:
Markup
Copy Code
<DateTimeEditors:C1DateTimePicker Height="60" Width="450" TimeFormat="ShortTime" DateFormat="Long"/>
  1. Add FirstDayOfWeek="Wednesday" to the <DateTimeEditors:C1DateTimePicker/> tag; this will change the first day of the drop-down calendar's week to Wednesday. The XAML markup appears as follows:
Markup
Copy Code
<DateTimeEditors:C1DateTimePicker Height="60" Width="450" TimeFormat="ShortTime" DateFormat="Long" FirstDayOfWeek="Wednesday"/>

In this step, you customized the appearance of the C1DateTimePicker control. In the next step, you will run the project and experience the functionality of the control.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback